{
if (gtk_widget_is_visible (widget))
{
- GtkAllocation allocation;
-
priv->last_visible_child = priv->visible_child;
- gtk_widget_get_allocated_size (priv->last_visible_child->widget, &allocation, NULL);
- priv->last_visible_widget_width = allocation.width;
- priv->last_visible_widget_height = allocation.height;
+ priv->last_visible_widget_width = gtk_widget_get_allocated_width (priv->last_visible_child->widget);
+ priv->last_visible_widget_height = gtk_widget_get_allocated_height (priv->last_visible_child->widget);
}
else
{
return priv->has_tooltip;
}
-/**
- * gtk_widget_get_allocated_size:
- * @widget: a #GtkWidget
- * @allocation: (out): a pointer to a #GtkAllocation to copy to
- * @baseline: (out) (allow-none): a pointer to an integer to copy to
- *
- * Retrieves the widget’s allocated size.
- *
- * This function returns the last values passed to
- * gtk_widget_size_allocate(). The value differs from
- * the size returned in gtk_widget_get_allocation() in that functions
- * like gtk_widget_set_halign() can adjust the allocation, but not
- * the value returned by this function.
- *
- * If a widget is not visible, its allocated size is 0.
- */
-void
-gtk_widget_get_allocated_size (GtkWidget *widget,
- GtkAllocation *allocation,
- int *baseline)
-{
- GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
-
- g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (allocation != NULL);
-
- allocation->x = graphene_matrix_get_value (&priv->allocated_transform, 3, 0);
- allocation->y = graphene_matrix_get_value (&priv->allocated_transform, 3, 1);
- allocation->width = priv->allocated_width;
- allocation->height = priv->allocated_height;
-
- if (baseline)
- *baseline = priv->allocated_size_baseline;
-}
-
/**
* gtk_widget_get_allocation:
* @widget: a #GtkWidget
int gtk_widget_get_allocated_height (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
int gtk_widget_get_allocated_baseline (GtkWidget *widget);
-GDK_AVAILABLE_IN_ALL
-void gtk_widget_get_allocated_size (GtkWidget *widget,
- GtkAllocation *allocation,
- int *baseline);
GDK_AVAILABLE_IN_ALL
void gtk_widget_get_allocation (GtkWidget *widget,